package cn.itcast.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;

/**
 * @author asus
 * @date 2018-07-11:10:56
 * @copy 本项目版权归朱圣祥所有, 未经允许不得私自复制
 */
@RestController("hello")
//rest风格的
//查询 get
//添加 post
//修改 put
//删除 delete
public class HelloController {

    @Autowired
    private DataSource dataSource;

    @GetMapping()
    public String hello() {
        return "hello, spring boot!" + dataSource;
    }
}